﻿using System;

using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;

namespace WinSat
{
    static class Program
    {
        public static SqlService.Service servis;
        public static Sessions Session = null;
        public static string SessionID = "";
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            SessionID = Guid.NewGuid().ToString();
            Session = Sessions.Get;
            Session.readAllSettings();

            if (!File.Exists(Methods.StartupPath() + "\\ayarlar.ini"))
            {
                using (frmAyarlar set = new frmAyarlar())
                {
                    set.ShowDialog();
                }
            }

            if (Program.Session[Settings.BaglantiTipi].ToString() == "servis")
            {
                servis = new WinSat.SqlService.Service();
            }

            Application.Run(new frmMain());

            Session.CloseSession();
        }
    }
}